package com.dd.front.controller;

import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.Map;

@Slf4j
@Tag(name = "App", description = "最基础的接口，可做测试")
@RestController
@RequestMapping("/app")
public class AppController {

    @Operation(summary = "获取欢迎信息")
    @GetMapping("/hello")
    public Object hello() {
        Map<String, String> map = new HashMap<>();
        map.put("code", "0");
        map.put("msg", "success");
        map.put("data", "欢迎使用");
//        throw new BusinessException(ErrorEnum.PAYMENT_ERROR);
        return map;
    }
}